home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
009a
/
dtest12.zip
/
DTESTFOX.DOC
< prev
next >
Wrap
Text File
|
1991-06-11
|
2KB
|
55 lines
DTESTFOX 1.2 - A DISKETTE TEST MODULE FOR A FOXPRO PROGRAM
==========================================================
Written by: Richard L. Fink
RainTree Computer Systems
P.O.Box 2339
Mill Valley, CA 94941
Date: June 11, 1991
Compiler: MASM 6.0
License: DTESTFOX.BIN and it's assembler source file are hereby
placed in the Public Domain.
DTESTFOX.BIN is run as a Foxpro function. It tests a diskette
drive to see whether or not it contains a diskette. If a diskette is
detected, DTESTFOX will determine which of the following states it is in:
unformatted, formatted and empty, or formatted with files or directories.
A single ASCII number is returned for each condition.
This is invaluable for preventing the dreaded:
ABORT, RETRY, IGNORE?
in the middle of your beautiful Foxpro application screen.
DTESTFOX.BIN is run by calling it as a Foxpro function, using the "With"
option. The "With" value defines a one character field which contains
the letter of the diskette drive you wish to check. Note that no
validation is performed on the drive character.
Summary:
--------
Call Values:
This module expects a 1 character field passed to it. That field
will contain the drive character in either upper or lower case. On
entry to this module the field is pointed to by the registers DS:BX.
Return Values:
This module will return a 1 character value to the calling program.
It will place that value in the source field, replacing the drive
character.
The return value will be-
0 - Drive contains a formatted diskette which is empty.
1 - Drive contains a formatted diskette with files or directories.
2 - Drive contains an UNFORMATTED diskette.
3 - Drive does NOT contain a diskette.
4 - Drive is an unknown unit.
-------------------------------------------------------------------------
The idea for DTESTFOX came from a DOS Tip by Dan Gookin in the April 1991
issue of PC Computing Magazine.